﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Dapper_Core.DAL.Impl
{
    /// <summary>
    /// 定义同步属性时要处理的字段
    /// </summary>
    public interface ISelectField
    {
        /// <summary>
        /// 得到SelectField串
        /// </summary>
        /// <param name="dtoName">得到selectField的DTO的名称
        ///    例如:得到预测单明细对象的存货的selectField，该参数传递"IntendSaleOrderDetailDTO"
        /// </param>
        /// <param name="propertyName">对象类型的属性名称
        ///    例如：预测单明细上的存货，该参数为"Inventory"
        /// </param>
        /// <returns></returns>
        string GetSelectFieldEx(string dtoName, string propertyName);


        /// <summary>
        /// 得到SelectField串
        /// </summary>
        /// <returns></returns>
        string GetSelectField();

        /// <summary>
        /// 得到SelectField串，主要是在多个表左连接的情况下，对属性加前缀
        /// </summary>
        /// <returns></returns>
        string GetSelectField(string dtoName);

        /// <summary>
        /// 根据单据模板名称以及明细的名称得到selectFields
        /// </summary>
        /// <param name="voucherName">单据模板名称，EAP_Voucher表中的Name</param>
        /// <param name="detailsName">明细名称，单据模板中明细对应的DTO名称</param>
        /// <returns>selectFields字符串</returns>
        string GetSelectField(string voucherName, string detailsName);
    }
}
